function eq = setup_transition_matrices(eq, param,glob,options)
    
    lp          = eq.l;
    fspaceerg   = fundef({'spli',glob.bgridf,0,1});

    lp          = min(lp, glob.maxb);
    lp          = max(lp, glob.minb);
    
    Qb          = funbas(fspaceerg, lp);

    eq.Q           = dprod(glob.Qef,Qb);

    % Distribution of incumbent firms
    L                  = ones(size(eq.Q,1),1);
    eq.L               = L/sum(L);

    % now get the distribution of new entrants
    
    % have productivity distribution 
    % need to get their labor choice!

    
    % First, construct distribution where they're equally distributed over
    % choices of l
        
    entry_value   = griddedInterpolant(glob.agrid, eq.ve.v1, 'linear');
    entry_value   = entry_value(glob.sig_grid);
    
    prob_entry    = normcdf(entry_value - param.ce, 0, param.ce_noise);
    eq.prob_entry = prob_entry;
    
    % this step (1) applies entry decision (2) projects on coarser grid
    entrant_dist  = glob.Qshift'*(prob_entry.*glob.a_stat_E');
    
    sprintf('total prob of entry is %06f', sum(entrant_dist))
    
    % create the G matrix by spreading out the entrant productivity
    % arbitrarily across labor choices
    
    G                  = zeros(glob.Nsf,1);
    G(find(glob.sf(:,1) == glob.bgridf(end))) = entrant_dist;
    
    % now, compute entrant policy on the coarser grid
%     v2                  = eq.v2;
%     B                   = [glob.minb*ones(glob.n(2),1), glob.maxb*ones(glob.n(2),1)];
%     obj                 = @(y)valfunc_E(v2, glob.agrid,y,param,glob,options);     
%     y                   = goldenx(obj,B(:,1),B(:,2));
% 
%     [~,ve]                  = valfunc_E(v2, glob.agrid,y,param,glob,options);

    
    entrant_policy = repmat(eq.ve_l, 1, glob.nf(1))';
    entrant_policy = entrant_policy(:)';
    
    entrant_policy          = min(entrant_policy, glob.maxb);
    entrant_policy          = max(entrant_policy, glob.minb);
    
    eq.entrant_policy = entrant_policy;
            
    Qb             = funbas(fspaceerg, entrant_policy');

    % Then apply the policy function
    Qent           = dprod(glob.QeI,Qb);
    eq.G = Qent'*G;
    

end